import React, { useState } from 'react'
import "./App.css"
import Header from './components/Header'
import List from './components/List'
import Footer from './components/Footer'
export default function App() {
  //因为兄弟组件之间无法直接传值,所以将数据放在父组件中
  // 状态提升,初始化数据
  const [todoList,setTodoList]= useState([
    {id:'001',todo:'唱歌',done:false},
    {id:'002',todo:'跳舞',done:false},
    {id:'003',todo:'吃饭',done:false},
  ])
  return (
    <div className="todo-container">
      <div className="todo-wrap">
        <Header />
        <List todoList= {todoList}/>
        <Footer />
      </div>
    </div>
  )
}
